<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<script type="text/javascript">
//<![CDATA[
if (window.top != window) {
	window.top.location = window.location;
}
//]]>
</script>
<link href="<?php echo $this->asset('/css/login.css', true);?>" media="all" rel="stylesheet" type="text/css" />
<title>用户登录-后台管理系统</title>
</head>

<body id="login-page">
<div id="wrap">
  <div id="top"></div>
  <div id="main">
    <div id="login-wrap">
      <form action="" id="loginForm" method="post">
        <div class="login-text">
          <ul>
            <li>
              <label>用户名：<input autocomplete="off" name="username" type="text" /></label>
            </li>
            <li>
              <label>密　码：<input autocomplete="off" name="password" type="password" /></label>
            </li>
            <li>
              <label>验证码：<input autocomplete="off" class="captcha" maxlength="4" name="captcha" type="text" /></label>
              <img alt="验证码" id="captcha" src="<?php echo $this->createUrl('captcha');?>?<?php echo time();?>" title="看不清楚，换一张" />
            </li>
          </ul>
        </div>
        <div class="login-button">
          <ul>
            <li>
              <input class="sp-bt-01" type="submit" value="登录" />
            </li>
            <li>
              <input class="sp-bt-01" type="reset" value="重置" />
            </li>
          </ul>
        </div>
      </form>
    </div>
  </div>
  <div id="bottom">
    <?php if ($this->hasError()):?>
    <div style="clear: both;">
      <ul style="width:400px;margin-left:225px;line-height:20px;color:#FF0000;">
        <?php foreach ($this->getError() as $error):?>
        <li><?php echo $error;?></li>
        <?php endforeach;?>
      </ul>
    </div>
    <?php endif;?>
  </div>
</div>
<script src="<?php echo $this->asset('/js/libjj.js');?>" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
jQuery(function($) {
	$('#loginForm').validate({
		rules: {
			username: {required: true},
			password: {required: true},
			captcha: {required: true}
		},
		errorPlacement: $.noop
	});

	$('#captcha').click(function(e) {
		var d = new Date();
		this.src = this.src.substring(0, this.src.lastIndexOf('?')) + '?' + d.getTime();
	});
});
//]]>
</script>
</body>
</html>